package com.mrjy.common.util;


/**
 * @author Argan 短信模板详情,必须是在阿里大鱼“管理中心-配置管理”中的短信模板相一致
 */
public enum SMSTemplate {
	
	TEMPLATE_01	("验证码", "会员注册验证", "SMS_16440022", "验证码${code}，您正在注册成为${product}用户，感谢您的支持！"),
	TEMPLATE_02	("短信通知", "会员注册成功通知", "SMS_16465023", "恭喜你成为${name}的会员，账号为${code},密码为${passwod},请注意保管，不要告诉别人哦"),
	TEMPLATE_03 ("短信通知","会员注册成功通知","SMS_34330133","尊敬的${tname},你推荐的会员${sname}在${time}成功注册${product}。"),
	TEMPLATE_04 ("短信通知","用户激活账号通知","SMS_56975104","尊敬的${name}，你的账号${code}已成功激活365家长课堂福卡"),
	TEMPLATE_05 ("短信通知","用户激活账号通知","SMS_60675021","尊敬的${name}，截止目前${time}，您已成功推荐${number}位会员加入365家长课堂。您可以进入365家长课堂个人中心[赚分享金]模块查看具体信息。"),
	
	TEMPLATE_06	("验证码", "登录验证", "SMS_90845061", "您正在登录验证，验证码${code},请在10分钟内按页面提示提交验证码，切勿将验证码泄露于他人"),
	TEMPLATE_07	("验证码", "注册验证", "SMS_90995049", "您正在注册验证，验证码${code},请在10分钟内按页面提示提交验证码，切勿将验证码泄露于他人"),
	TEMPLATE_08 ("验证码","找回密码验证","SMS_91020044", "您正在找回密码，验证码${code},请在10分钟内按页面提示提交验证码，切勿将验证码泄露于他人"),
	TEMPLATE_09 ("验证码","手机绑定验证","SMS_90900045", "您正在绑定手机，验证码${code}，请在10分钟内按页面提示提交验证码，切勿将验证码泄露于他人"),
	TEMPLATE_10 ("验证码","福卡激活验证","SMS_91035048", "您正在福卡激活验证，验证码${code}，请在10分钟内按页面提示提交验证码，切勿将验证码泄露于他人"),
	
	TEMPLATE_11 ("短信通知","一级推广收入通知","SMS_135395101", "亲爱的${name}，您于${time} 成功邀请${payer}付费，帮您收入${income}元。"),
	TEMPLATE_12 ("短信通知","二级推广收入通知","SMS_135375099", "亲爱的${name}，您的推广者${pro}于${time} 成功邀请${payer}付费，帮您收入${income}元。");
	
	private String templateType = "";    	//模板类型
	private String templateName = "";		//模板名称
	private String templateID = "";			//模板ID
	private String templateContent = "";	//模板内容

	SMSTemplate(String templateType, String templateName, String templateID,
			String templateContent) {
		this.templateType = templateType;
		this.templateName = templateName;
		this.templateID = templateID;
		this.templateContent = templateContent;
	}
	
	public String getTemplateType() {
		return this.templateType;
	}
	public String getTemplateName() {
		return this.templateName;
	}
	public String getTemplateID() {
		return this.templateID;
	}
	public String getTemplateContent() {
		return this.templateContent;
	}
	
	public static String getTemplateID(Integer typeId){
		SMSTemplate sms = SMSTemplate.TEMPLATE_01;
		switch (typeId){
		case 1:
			sms = SMSTemplate.TEMPLATE_01;
			break;
		case 2:
			sms = SMSTemplate.TEMPLATE_02;
			break;
		case 7:
			sms = SMSTemplate.TEMPLATE_07;
			break;
		case 8:
			sms = SMSTemplate.TEMPLATE_08;
			break;
		case 9:
			sms = SMSTemplate.TEMPLATE_09;
			break;
		case 10:
			sms = SMSTemplate.TEMPLATE_10;
			break;
		case 11:
			sms = SMSTemplate.TEMPLATE_11;
			break;
		case 12:
			sms = SMSTemplate.TEMPLATE_12;
			break;
		}
		return sms.getTemplateID();
	}
}
